package com.panels;

import java.awt.BorderLayout;

import javax.swing.JPanel;

public class MainPanel extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3539193251262612356L;

	PagesPanel pagesPanel;

	NorthPanel northPanel;

	SouthPanel southPanel;

	EastPanel eastPanel;

	WestPanel westPanel;
	
	private static MainPanel singelTone;

	public static MainPanel getMainPanel()
	{

		if(singelTone==null)
		{
			singelTone=new MainPanel();
		}
		return singelTone;
	}
	private MainPanel() {
		pagesPanel = new PagesPanel();
		northPanel = new NorthPanel();
		southPanel = new SouthPanel();
		eastPanel = new EastPanel();
		westPanel = new WestPanel();
		
		initGui();
	}

	private void initGui() {
		this.setLayout(new BorderLayout());
		this.add(northPanel, BorderLayout.NORTH);
		this.add(southPanel, BorderLayout.SOUTH);
		this.add(pagesPanel, BorderLayout.CENTER);
		this.add(eastPanel, BorderLayout.EAST);
		this.add(westPanel, BorderLayout.WEST);
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public PagesPanel getPagesPanel() {
		return pagesPanel;
	}

	public NorthPanel getNorthPanel() {
		return northPanel;
	}

	public SouthPanel getSouthPanel() {
		return southPanel;
	}

	public EastPanel getEastPanel() {
		return eastPanel;
	}

	public WestPanel getWestPanel() {
		return westPanel;
	}

}
